package com.jlect.swebing.ui.client;

/**
 * Key event default implementation
 *
 * @author Sergey Kozmin
 * @since 28.11.2007 10:22:59
 */
public class KeyEventImpl extends BaseGEvent implements KeyEvent {
    private int keyCode = -1;
    private int keyEventType = -1;

    public KeyEventImpl(Object event, GComponent source, int keyCode, int keyEventType, int modifier) {
        super(event, KEY_EVENT, source, modifier);
        setKeyEventType(keyEventType);
        setKeyCode(keyCode);
    }

    public void init(Object event, GComponent source, int keyCode, int keyEventType, int modifier) {
        init(event, KEY_EVENT, source, modifier);
        setKeyEventType(keyEventType);
        setKeyCode(keyCode);
    }

    public int getKeyEventType() {
        return keyEventType;
    }

    public void setKeyEventType(int keyEventType) {
        this.keyEventType = keyEventType;
    }

    public int getKeyCode() {
        return keyCode;
    }

    public void setKeyCode(int keyCode) {
        this.keyCode = keyCode;
    }
}
